---
id: "inline-decorator"
keywords: ["inline", "decorator"]
name: "@inline"
summary: "This is the `@inline` decorator."
category: "decorators"
---

The `@inline` decorator tells the compiler to inline its value
in every place the binding is being used, rather than use a variable.

### Example

<CodeTab labels={["ReScript", "JS Output"]}>

```res
module Colors = {
  @inline
  let green = "green"

  @inline
  let red = "red"
}

let allowedColors = [Colors.green, Colors.red]
```

```js
var allowedColors = ["green", "red"];
```

</CodeTab>

### References

- [Inlining Constants](../docs/manual/inlining-constants.mdx)
